package com.happycat.mapper.social;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.happycat.social.entity.SocialFollow;
import com.happycat.social.vo.FollowVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface SocialFollowMapper extends BaseMapper<SocialFollow> {

//    @Select("select f.focus_type as 'focusType', " +
//            "       a.id as 'followId', " +
//            "       a.nick as 'followUserName', " +
//            "       a.avatar as 'followUserHeadAvatar', " +
//            "       a.signature as 'followUserSignature' " +
//            " from user_account a " +
//            "               inner join user_official_account f  on a.id = f.focus_id " +
//            " where f.account_id = #{} and f.focus_type = 0")
//    Page<FollowVo> myFollowPage(IPage<FollowVo> page, @Param(Constants.WRAPPER) QueryWrapper<SocialFollow> eq);

    /**我的关注列表*/
    Page<FollowVo> myFollowPage(IPage<FollowVo> page, @Param("accountId") long accountId, @Param("focusType") int focusType);

    /**我的粉丝列表*/
    Page<FollowVo> myFansPage(IPage<FollowVo> page, @Param("accountId") long accountId);

    /**我的好友列表*/
    Page<FollowVo> myFriendsPage(IPage<FollowVo> page, @Param("accountId") long accountId);

}